#include<iostream>
#include<cstring>
using namespace std;
int judge(char* a1,char* a2)
{
    int len1=strlen(a1);
    int len2=strlen(a2);
    int i=0,j=0;
    while(i<len1 && j<len2)
    {
        if(a1[i]>a2[j])
        {
            return 1;
        }
        if(a1[i]<a2[i])
        {
            return -1;
        }
        ++i;
        ++j;
    }
    if(len1>len2)
        return 1;
    if(len1<len2)
        return -1;
    return 0;
}
class Str
{
private:
    char* p;
public:
    Str()
    {
        p=new char[1];
        p[0]='\0';
    }
    Str(char* s)
    {
        if(s)
        {
            p=new char[strlen(s)+1];
            strcpy(p,s);
        }
        else
        {
            p=new char[1];
            p[0]='\0';
        }
    }
    
    friend bool operator >(Str& a, Str& b)
    {
        if(judge(a.p,b.p)==1)
        {
            return true;
        }
        return false;
    }
    friend bool operator <(Str& a, Str& b)
    {
        if(judge(a.p,b.p)==-1)
        {
            return true;
        }
        return false;
    }
    friend bool operator ==(Str& a, Str& b)
    {
        if(judge(a.p,b.p)==0)
        {
            return true;
        }
        return false;
    }
    void show()
    {
        cout << p;
    }
};
int main()
{
    char a1[500],a2[500],a3[500];
    cin.getline(a1,500);
    cin.getline(a2,500);
    cin.getline(a3,500);
    Str A(a1),B(a2),C(a3);
    if(A>B)
    {
        A.show();
    }
    else
    {
        B.show();
    }
    cout<<endl;
    if(A<C)
    {
        A.show();
    }
    else
    {
        C.show();
    }
    cout<<endl;
    if(B==C)
    {
        B.show();
    }
    else
    {
        C.show();
    }
}